/** 切换状态的公用ts文件 */
import { ref } from 'vue'
import type { Ref } from 'vue'

export function useToggleShow(initState: boolean): [Ref<boolean>, () => void] {
  const state = ref(initState)
  const changeState = function () {
    state.value = !state.value
  }
  return [state, changeState]
}
